<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
    </div>
</div>
<footer> 
   <div class="footer-l"> 
    <p>
		<?php $this->widget('Widget_Contents_Page_List')->to($pages); ?>
        <?php while($pages->next()): ?>
        <a href="<?php $pages->permalink(); ?>" title="<?php $pages->title(); ?>"><?php $pages->title(); ?></a> | 
        <?php endwhile; ?> 
		<a href="<?php $this->options->feedUrl(); ?>"><?php _e('文章 RSS'); ?></a> | 
        <a href="<?php $this->options->commentsFeedUrl(); ?>"><?php _e('评论 RSS'); ?></a>
	</p> 
    <p> &copy; <?php echo date('Y');?> <a href="<?php $this->options->siteUrl(); ?>" target="_blank"> <?php $this->options->title() ?> </a>
        <?php _e(' / Powered by <a href="http://www.typecho.org" target="_blank">Typecho</a>'); ?>
        <?php if ($this->options->icpNum): ?>
           / <a href="http://www.miitbeian.gov.cn/" target="blank"><?php $this->options->icpNum(); ?></a>
        <?php endif; ?>
	</p> 
   </div> 
  </footer> 
<?php $this->footer(); ?>
<script>
$(function(){
	$('.set-view-mode').click(function(){
		setReadMode($(this).data('mode'));
	});
	window.onload = function(){
		setReadMode();
	};
	function setReadMode(mode){
		var btn = $('.set-view-mode');
		mode = mode===undefined ? getCookie('read-mode') : mode;
	    if(mode=='day'){
	    	$('body').addClass('night-mode');
	    	btn.data('mode','night').find('i').attr('class','fa fa-sun-o');
	    }else{
		    if($('body').hasClass('night-mode')){
		    	$('body').removeClass('night-mode');
				btn.data('mode','day').find('i').attr('class','fa fa-moon-o');
			}
		}
	    setCookie('read-mode',mode);
	}
	function setCookie(name,value){  
	    var Days = 30;  
	    var exp  = new Date();  
	    exp.setTime(exp.getTime() + Days*24*60*60*1000);  
	    document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();  
	}
	function getCookie(name) {
	    var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
	    if(arr=document.cookie.match(reg))
	        return unescape(arr[2]); 
	    else 
	        return null; 
	}
});
</script>
</body>
</html>